# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=lxqt-powermanagement
pkgver=1.1.0
pkgrel=0
pkgdesc="Power management module for LXQt"
url="https://github.com/lxqt/lxqt-powermanagement"
# s390x and riscv64 blocked by polkit -> solid
arch="all !s390x !armhf !riscv64"
license="LGPL-2.0-or-later"
makedepends="
	cmake
	samurai
	kidletime-dev
	kwindowsystem-dev
	liblxqt-dev
	lxqt-build-tools
	lxqt-globalkeys-dev
	qt5-qttools-dev
	solid-dev
	"
options="!check" # No testsuite
subpackages="$pkgname-lang"
source="https://github.com/lxqt/lxqt-powermanagement/releases/download/$pkgver/lxqt-powermanagement-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

lang() {
	install_if="lang $pkgname=$pkgver-r$pkgrel"
	amove usr/share/lxqt/translations/$pkgname
}

sha512sums="
1c675e69371f7c4b684be6e43627ffd9d69f38d5c4edbccd577cc374d73046c3f260fa555fa8e8e5ab9ed00e81d72c987e8959760a9a31ed277aaaf88670d4b8  lxqt-powermanagement-1.1.0.tar.xz
"
